package com.itheima.springboot02_demo01.controller;

import com.aliyuncs.CommonResponse;
import com.itheima.springboot02_demo01.config.SMSClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {
    @Autowired
    private SMSClient smsClient;
    @GetMapping("/test")
    public String test(){
        CommonResponse response = smsClient.sendCode("13716457961", "abcdedf");
        System.out.println(response.getData());
        return "测试!";
    }
}
